package com.qidian.common;

/**
 * 消息的状态，只能按从前往后的变化，不能回退。
 * 比如不能将'超时'状态改为'已回答状态'。
 * 
 * */
public enum MessageStatus 
{
//	DELETED(-1,"已删除"),
	WAIT_TO_ANSWER(0,"待取"),
	PROCESSING(1,"待答"),
	ANSWERED(2,"正确"),
	TIME_OUT(3,"超时"),
	WRONG(4,"错题"),
	WRONG_REPORT(5,"误报"),
	WRONG_ANSWER(6,"误答"),
	OTHER(7,"其他");
	
	public int status ;
	public String description ;
	
	private MessageStatus(int status, String description)
	{
		this.status = status ;
		this.description = description ;
	}
	public int getStatus(){
		return status ;
	}
	public String getDescription(){
		return description ;
	}
	
	public static MessageStatus get(int status)
	{
		if (status <0 || status >= MessageStatus.values().length)
			return null ;
		return MessageStatus.values()[status] ;
	}
}
